package myschool.test3;

import myschool.dao.StudentDao;
import myschool.entity.Student;
import myschool.util.MybatisUtil;
import org.apache.ibatis.session.SqlSession;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author oldliu
 * @since 1.0
 */
public class StuQ3 {
    public static void main(String[] args) throws ParseException {
        //String ->Date
        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
        SqlSession s = MybatisUtil.get();
        StudentDao mapper = s.getMapper(StudentDao.class);
        Map<String,Object> m=new HashMap<>();
        m.put("sname","李八199");
        m.put("sex","男");
        m.put("telephone","183610187908838");
        List<Student> list = mapper.search3(m,1, 10);

        list.forEach(System.out::println);
        MybatisUtil.close(s);


    }
}
